import VueRouter from 'vue-router'

import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MemberContainer.vue'
import shopcar from './components/tabbar/ShopCarContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import newslist from './components/news/NewsList.vue'
import newsinfo from './components/news/NewsInfo.vue'
import photolist from './components/photoes/PhotoList.vue'
import photoinfo from './components/photoes/PhotoInfo.vue'
import goodslist from './components/goods/GoodsList.vue'
import goodsinfo from './components/goods/GoodsInfo.vue'
import goodscomment from './components/goods/GoodsComment.vue'
import goodsimageinfo from './components/goods/GoodsImageInfo.vue'

var router = new VueRouter({
  routes: [
    { path: '/home', component: home },
    { path: '/member', component: member },
    { path: '/shopcar', component: shopcar },
    { path: '/search', component: search },
    { path: '/', redirect: '/home' },
    { path: '/home/newslist', component: newslist },
    { path: '/home/newsinfo/:id', component: newsinfo },
    { path: '/home/photolist', component: photolist },
    { path: '/home/photoinfo/:id', component: photoinfo },
    { path: '/home/goodslist', component: goodslist },
    { path: '/home/goodsinfo/:id', component: goodsinfo },
    { path:  '/home/goodscomment/:id', component: goodscomment, name: 'goodscomment' },
    { path:  '/home/goodsimageinfo/:id', component: goodsimageinfo, name: 'goodsimageinfo' }
  ],
  linkActiveClass: 'mui-active'   // 覆盖默认高亮的类
})

export default router